import {NgModule, ErrorHandler} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {IonicApp, IonicModule, IonicErrorHandler} from 'ionic-angular';
import {HttpModule} from '@angular/http';
import {FormsModule} from '@angular/forms';
import {DatePipe} from "@angular/common";
//import {Http} from '@angular/http';
import {HttpClientModule} from '@angular/common/http';
import {MyApp} from './app.component';


import {StatusBar} from '@ionic-native/status-bar';
import {SplashScreen} from '@ionic-native/splash-screen';
import {AppUpdate} from '@ionic-native/app-update';
import {AppVersion} from '@ionic-native/app-version';
import { FileTransfer} from '@ionic-native/file-transfer';
import { File } from '@ionic-native/file';
import { FileOpener } from '@ionic-native/file-opener';
//import { NativeStorage } from '@ionic-native/native-storage';
import { Diagnostic } from '@ionic-native/diagnostic';
//import { AndroidPermissions } from '@ionic-native/android-permissions';
//import {Camera} from "@ionic-native/camera";
//import { HTTP } from '@ionic-native/http';
//import { BarcodeScanner } from '@ionic-native/barcode-scanner';

import {HttpService} from '../providers/httpService';
// import {Http2Service} from '../providers/http2Service';
//import {Http3Service} from '../providers/http3Service';
//import {Http4Service} from '../providers/http4Service';
//import {Http5Service} from '../providers/http5Service';
import {BackButtonService} from '../providers/backButtonService';
import {UrlService} from '../providers/urlService';
import {VersionService} from '../providers/versionService';
import {EncryptService} from '../providers/encryptService';
import {IntfService} from '../providers/intfService';
import {StorageService} from '../providers/storageService';
import { ParamService } from '../providers/paramService';
//import { BluetoothService } from '../providers/bluetoothService';
//import { CameraService } from '../providers/cameraService';
import {CommonUtilService} from "../providers/commonUtilService";
//import {CommonService} from "../providers/commonService";
import {ValidService} from "../providers/validService";
import {UtilService} from "../providers/utilService";
//import {DatePicker} from "@ionic-native/date-picker";
import { Device } from '@ionic-native/device';



import { AboutPage } from '../pages/about/about';
import { ContactPage } from '../pages/contact/contact';
//import { TabsPage } from '../pages/tabs/tabs';

import { NFC, Ndef } from '@ionic-native/nfc';

@NgModule({
  declarations: [
    MyApp,
    AboutPage,
    ContactPage,
    //TabsPage
  ],
  imports: [
    BrowserModule,
    HttpModule,
    FormsModule, // if used
    // JsonpModule, // if used
    HttpClientModule,
    IonicModule.forRoot(MyApp,{
      tabsHideOnSubPages: 'true',         //隐藏全部子页面tabs
      mode: 'ios',  //强制使用ios风格
      iconMode:'ios', //强制使用ios风格icon
      backButtonText: '返回', //顶部返回按钮文字
      platforms: {
        ios: {

        },
        android: {

        }
      }
    }),
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    AboutPage,
    ContactPage,
    //TabsPage
  ],
  providers: [
    StatusBar,
    SplashScreen,
    AppUpdate,
    AppVersion,
    File,
    FileOpener,
    FileTransfer,
    //NativeStorage,
    Diagnostic,
    //Camera,//摄像头
    //BarcodeScanner,
    DatePipe,//日期格式化
    //DatePicker,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    HttpService,
    // Http2Service,
    // Http3Service,
    // Http4Service,
    BackButtonService,
    UrlService,
    VersionService,
    EncryptService,
    IntfService,
    StorageService,
    ParamService,
    //BluetoothService,
    //CameraService,
    CommonUtilService,
    //CommonService,
    Device,
    ValidService,
    UtilService,
    //NFC
    NFC, Ndef
  ]
})
export class AppModule {}
